import BaseFetch from './http'
import {SummaryParams} from './ts/jy'

export const getSummary = async(paramsData: SummaryParams): Promise<any> => {
  const {url, data} = paramsData
  return BaseFetch.POST({
    url,
    params: data.constructor === String ? data : JSON.stringify(data),
    header: { 'Content-Type': 'application/json;charset=UTF-8' },
  })
}